const usePsyAppStore = defineStore(
  'psyApp',
  () => {
    /**
     * 侧边栏的被选中的路由
     */
    const choosedRoute = ref('/psy/home')

    /**
     * 改变被选择的路由
     * @param {*} route 变化后的路由
     */
    const setChoosedRoute = (route) => {
        choosedRoute.value = route
    }
    return {
        choosedRoute,
        setChoosedRoute
    }
  },
  { 
    persist: {
        storage: sessionStorage
    }
  }
)

export default usePsyAppStore